import com.eninus.notification.ios.*;

public class Test {

	public Test() {
	}
	public static void main(String[] args) {
		
		PushManager pushManager=PushManager.getInstance();
		
		int notiIdentifier=Integer.MAX_VALUE;
        notiIdentifier=notiIdentifier-1;
        
        int initialThreadCount=2;
        String JKSFileName="jks.jks";
        String JKSPassword="password";
        int expireSecondsSince1970=(int)(System.currentTimeMillis()/1000+60*60*1);
        String base64TokenString="o5WQ+BtgZzsZnXZ4";
        String notificationBody="Hello";
        
		try {
			
			pushManager.startPushManger(initialThreadCount, JKSFileName, JKSPassword);
			
		    IOSNotificationPacket iosNotificationPacket=pushManager.pushNotification(notiIdentifier, expireSecondsSince1970, base64TokenString, notificationBody);
		   
			while(!pushManager.sentConfirm(iosNotificationPacket)){
				Thread.sleep(10);
			}
			
			pushManager.stopPushManager();
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}

}
